#ifndef TREE_H__
#define TREE_H__
typedef char datatype;

typedef struct tree_st
{
	datatype data;
	struct tree_st *lchild;
	struct tree_st *rchild;
}tree_st;

//树的深度
int getDepth(tree_st *ptr);

//结点插入
int tree_insert(tree_st **,datatype);

//结点查找
tree_st *tree_find(tree_st *,datatype);

//左倒画树
void tree_draw(tree_st *);

//树的平衡
void tree_balance(tree_st **);

//结点删除
void tree_delete(tree_st **,datatype);

//层次遍历
void level_show(tree_st *);

//先序遍历
void first_show(tree_st *);

//中序遍历
void middle_show(tree_st *);

//后序遍历
void last_show(tree_st *);

void firstShow(tree_st *);
#endif
